let data = Mock.mock({
    "list|100": [
        {
            "id": "@id",
            "email": "@email",
            "name": "@cname",
            "phone|13000000000-19999999999": 1,
            "inngroup|+1": ["后端组", "前端组", "测试组"],
            "isadmin|1": true,
            "status|1": true
        }
    ],
    "list1|5": [
        {
            "id": "@id",
            "email": "@email",
            "name": "@cname",
        }
    ]
})

function render() {
    let str = ``
    str = data.list.map((item, index) => {
        return `<tr>
                        <td>${item.email}</td>
                        <td>${item.name}</td>
                        <td>${item.phone}</td>
                        <td>${item.inngroup}</td>
                        <td>${item.isadmin ? "是" : "否"}</td>
                        <td>${item.status ? `<button>正常</button>` : `<button class="active">异常</button>`}</td>
                        <td>
                            <span class="iconfont icon-bianji"></span>
                            <span class="iconfont icon-shanchu"></span>
                        </td>
                    </tr>`
    }).join('')
    document.querySelector('tbody').innerHTML = str;
}

function render1() {
    let str = ``
    str = data.list1.map((item, index) => {
        return `<tr>
                    <td>${item.email}</td>
                    <td>${item.name}</td>
                    <td>${item.phone}</td>
                    <td>
                        <span class="iconfont icon-shanchu"></span>
                    </td>
                </tr>`
    }).join('')
    document.querySelector('tbody').innerHTML = str;
}